package com.cnplan.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.cnplan.entity.GisSpgcEntity;
import com.cnplan.entity.GisZdEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface GisZdMapper extends BaseMapper<GisZdEntity> {
    @Select(value = "SELECT *,st_asgeojson(geom) as geojson FROM \"gis_zd\" WHERE st_intersects(st_pointfromtext('point(${x} ${y})', st_srid(geom)),geom)=TRUE")
    List<GisZdEntity> getAllByGeom(@Param("x") String x, @Param("y") String y);
}
